#pragma once
#include "Core.h"
#include "Engine\Layer.h"
#include "3rd\imgui\imgui.h"
#include <string>
#include "Log.h"
namespace Engine
{
	class ENGINE_API ImGuiLayer : public Layer
	{
	public:
		ImGuiLayer(const std::string& name) :Layer(name) {
			ENGINE_INFO("Init {0}.",name);
		}
		~ImGuiLayer() = default;

		virtual void OnAttach() override;
		virtual void OnDetach() override;
		virtual void OnImGui() override;
		void Begin();
		void End();
		void BlockEvents(bool block) { m_BlockEvents = block; }
		virtual void OnEvent(Event& event);
	private:
		bool m_BlockEvents = true;
		float m_Time = 0.0f;
	};
}

